﻿@{
    Layout = null;
    YiSha.Entity.YiDongYuan.MechanicsEntity mechanics = ViewBag.Mechanics;
}
@using YiSha.Entity.YiDongYuan;
<html>
<head>
    <title>查看二维码</title>
    <link href="~/lib/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
    <style type="text/css">
        .continer {
            background-image: url('/image/barcodeBg.jpg');
            background-repeat: no-repeat;
            background-size: 100% 100%;
            -moz-background-size: 100% 100%;
            width: 739px;
            height: 504px;
        }

            .continer img {
                margin-top: 120px;
                margin-left: 250px;
                width: 240px;
            }

            .continer span {
                display: block;
                font-size: 90px;
                text-align: center;
                line-height: 95px;
                font-family: 黑体;
            }

        .print {
            padding-top: 50px;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

            .print span {
                font-size: 40px;
                font-family: 黑体;
                line-height: 50px;
            }
    </style>
    <!-- 8.6*5.4 -->
    <script src="~/lib/jquery/2.1.4/jquery.min.js"></script>
</head>
<body>
    <input type="button" value="打印" id="btnPrint" class="btn btn-success btn-lg" style="margin:10px 50px;" />
    <div class="continer">
        <img src="/YiDongYuan/Mechanics/QrCode/@mechanics.HuanBaoCode" width="100px;" />
        <span>@mechanics.HuanBaoCode</span>
    </div>
    <div class="print">
        <img src="/YiDongYuan/Mechanics/QrCode/@mechanics.HuanBaoCode" width="100px;" />
        <span>@mechanics.HuanBaoCode</span>
    </div>

    <script type="text/javascript">
        $(".print").hide();
        $("#btnPrint").click(function () {
            $("#btnPrint").hide();
            $(".continer").hide();
            $(".print").show();
            window.print();
            $(".continer").show();
            $("#btnPrint").show();
            $(".print").hide();
        });
    </script>
</body>
</html>